//
//  JPFHttpManager.h
//  JPFCoreKit
//
//  Created by jpf on 2021/7/28.
//  Copyright © 2021 jpf. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "JPFHttpResponse.h"

NS_ASSUME_NONNULL_BEGIN

typedef enum : NSUInteger {
    JPFServiceDataType_default,//URL
    JPFServiceDataType_URL,
    JPFServiceDataType_JSON,
} JPFServiceDataType;

typedef enum : NSUInteger {
    JPFHttpMethod_GET,
    JPFHttpMethod_POST,
} JPFHttpMethod;

@interface JPFHttpManager <__covariant T> : NSObject

- (NSURLSessionDataTask *)POST:(NSString *)requestUrl
                    parameters:(NSDictionary *)parameters
                    completion:(void (^)(BOOL success, NSDictionary *resObj, NSString *message,NSError *error))completion;

- (NSURLSessionDataTask *)POST:(NSString *)requestUrl
                          data:(NSData *)data
                        header:(NSDictionary *)header
                    completion:(void (^)(BOOL success, NSDictionary *resObj, NSString *message,NSError *error))completion;


@end

NS_ASSUME_NONNULL_END
